<?php
if (isset($_REQUEST['deviceId'])) {
	require_once 'db.inc.php';
	$deviceId = $_REQUEST['deviceId'];
	mysql_query("UPDATE ".TABLE_PREFIX."devices SET active = 0 WHERE deviceId = '$deviceId'");
} else {
	echo json_encode(array("success" => false, "message" => "invalid request"));
}
?>